import openpyxl
file = openpyxl.load_workbook('./dede_shops_products.xlsx')
'''
print(file)
#查看表单
print(file.sheetnames)
#查看表单
for sheel in file :
    print(sheel.title)
#创建表单
file.create_sheet('my_sheet')
print(file.sheetnames)

#获取表单
sheet4 = file['my_sheet']
'''
ws = file.active
'''
c = ws['A1']
c = ws.cell(row=1,column=2)
print(f'Row {c.row} Column {c.column} is {c.value}')
print(f'cell {c.coordinate} is {c.value}')
#去列对象
colC = ws['A']
for col in colC :
    print(col.value)

rowC = ws[2]
for row in rowC :
    print(row.value)
'''
c = ws['A1':"B12"]
for cell in c :
    for cellobj in cell :
        print(cellobj.value)





file.close()